  function showResponse(response) {
            var xmlResult = response.responseXML;
            var loginStatus = xmlResult.getElementsByTagName("passport")[0].getAttribute("loginStatus");
            if (loginStatus == 'failure') {
                var loginresult = document.getElementById("login-form-result");
                loginresult.innerHTML = "<span style='color:red;'>登录失败!</span>";
                 document.getElementById("loadingDiv").style.display="none";
                 document.getElementById("loginDiv").style.display="";
            }
            else {
               var account = xmlResult.getElementsByTagName("account")[0];
               var nickName = xmlResult.getElementsByTagName("nickName")[0];
               var sessionId = xmlResult.getElementsByTagName("sessionId")[0];
               var account_str, nickName_str, sessionId_str;
               document.getElementById("loadingDiv").style.display="none";
               try {
                  account_str = account.firstChild.nodeValue;
               }
               catch(e) {
               }
               try {
                  nickName_str = nickName.firstChild.nodeValue;
               }
               catch(e) {
               }
               try {
                  sessionId_str = sessionId.firstChild.nodeValue;
               }
               catch(e) {
               }          
               
               
               var notifyLogonUrl = document.getElementById("notifyLogonUrl"); 
              try {
                  notifyLogonUrl.src = "http://passport.o.cn/passport/logon!notifyLogon.action?loginMember.sessionId=" + sessionId_str;
                  
                  var loginresult = document.getElementById("login-form-result");
                  loginresult.innerHTML = "<span style='color:blue;' align='center'>登录成功!</span>";
                  var loginPrompt = document.getElementById("loginPrompt"); 
                  loginPrompt.innerHTML=" 欢迎:" + account_str + "&nbsp;&nbsp;<a href='http://passport.o.cn/passport/logon.action' target='_blank'>管理</a>&nbsp;&nbsp;<a href='javascript:passportLogout()'>退出</a>";
                  window.setTimeout(closeLogonWin,1000);                    
               }
               catch(e) {
                  alert(e.message);
                  var loginresult = document.getElementById("login-form-result");
                  loginresult.innerHTML = "<span style='color:red;'>登录失败!</span>";
                  document.getElementById("loadingDiv").style.display="none";
                  document.getElementById("loginDiv").style.display="block";
               }  
               
            }
	        
            
                      
  }
  
  function login_show() {
      win.setTitle('都市圈登录口');
      win.setSize(300,200);
      win.getContent().innerHTML= $('login-c').innerHTML;
      $('login-form-result').innerHTML = '';
      win.showCenter();
  }
  
  var _st=window.setTimeout;
 window.setTimeout=function(fRef,mDelay){
    if(typeof fRef=='function'){
       var argu=Array.prototype.slice.call(arguments,2);
       var f=(function(){fRef.apply(null,argu);});
       return _st(f,mDelay);
    } 
    return _st(fRef,mDelay);
  }  

function openLogonWin() {
     var loginresult = document.getElementById("login-form-result");
     loginresult.innerText = "";
     var form = document.forms[0];
     form.userName.value="";
     form.password.value="";
     var formWin = document.getElementById("loginform");
	 formWin.style.display = "block";
}
function closeLogonWin() {
     var formWin = document.getElementById("loginform");
	 formWin.style.display = "none";
	 document.getElementById("loginDiv").style.display="";
    document.getElementById("loadingDiv").style.display="none";
}
